#ifndef _FONT_H_
#define _FONT_H_

#include "render.h"
#include <map>
#include <string>

using namespace std;

struct ch_rect
{
	ch_rect(){}
	ch_rect(float _tu,float _tv,float _tw,float _th,float _a,float _c)
	{
		tu=_tu;
		tv=_tv;
		tw=_tw;
		th=_th;
		a = _a;
		c = _c;
	}
	float tu;
	float tv;
	float tw;
	float th;
	float a;
	float c;
};

class font
{
public:
	font(const char* _fname,color _color=color(1.0f,1.0f,1.0f,1.0f),float _scle=1.0f);
	~font();

	void print(float _x,float _y,float _z,const char* _format,...);

private:
	render*  m_render;
	texture* m_texture;
	float m_tex_w;
	float m_tex_h;
	color m_color;
	float m_scale;
	map<char,ch_rect> m_charset;
};

#endif